import {defineStore} from "pinia";

interface UserState {
    createTime: string;
    email: string;
    id: number;
    userAccount: string;
    userExp: number;
    userName: string;
    userProfile: string;
    userRole: string;
}

const useUserInfoStore = defineStore('user', {
    state: () => ({
        userInfo: {} as UserState,
    }),
    actions: {
        setUserInfo(userInfo: UserState){
            this.userInfo = userInfo
        },
        removeInfo(){
            this.userInfo = {}
        },
    },
})
export default useUserInfoStore
